/*
* @Author: dengjiayao
* @Date:   2018-03-21 10:10:11
* @Last Modified by:   dengjiayao
* @Last Modified time: 2018-03-21 13:18:40
*/
import { alert } from 'vue-strap'
import Vue from '../vue'
import store from '../vuex/store'
import loginCheck from '../util/login-check'
import List from './child-account-list/child-account-list.vue'
import Config from './child-account-config/child-account-config.vue'

new Vue({
  el: 'body',
  components: {
    'vue-alert-msg': alert,
    'vue-list': List,
    'vue-config': Config
  },
  store,
  created() {
    loginCheck(this)
  },
  vuex: {
    getters: {
      msg: state => state.msg
    }
  },
  methods: {
    addItem() {
      let ref = this.$refs.config
      ref.actionType = 'ADD'
      ref.form = {
        brokerageCusCode: '',
        customerName: '',
        receiveBankaccount: ''
      }
      ref.showModal = true
    }
  }
})
